<template>
  <el-select>
    <el-option v-for="item in difficultyList" :label="item.difficultyName"
     :value="item.difficulty" :key="item.difficulty" />
     <!-- 这里得绑定一个key要不然一直显示红色的 -->
  </el-select>
</template>
<script setup>
import { reactive } from 'vue'
const difficultyList = reactive([
  {
    "difficulty": 1,
    "difficultyName": "简单",
  },
  {
    "difficulty": 2,
    "difficultyName": "中等",
  },
  {
    "difficulty": 3,
    "difficultyName": "困难",
  }
])
</script>
